package com.erp.mapper;

import com.erp.pojo.OutStock;
import com.erp.pojo.OutStockExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface OutStockMapper {
    long countByExample(OutStockExample example);

    int deleteByExample(OutStockExample example);

    int deleteByPrimaryKey(Integer outId);

    int insert(OutStock record);

    int insertSelective(OutStock record);

    List<OutStock> selectByExample(OutStockExample example);

    OutStock selectByPrimaryKey(Integer outId);

    int updateByExampleSelective(@Param("record") OutStock record, @Param("example") OutStockExample example);

    int updateByExample(@Param("record") OutStock record, @Param("example") OutStockExample example);

    int updateByPrimaryKeySelective(OutStock record);

    int updateByPrimaryKey(OutStock record);

    int insertOutStock(@Param("stockList")List<OutStock>stockList);

    List<OutStock> conditionDate(String date);

    int countStock(@Param("map")Map<String, Object> map);

    List<OutStock> findAllStock(@Param("map")Map<String, Object> map);

    int updateOutStockState(@Param("state") Integer state,@Param("id") Integer id);

    int updateOutStockStateByIds(@Param("state") Integer state,@Param("ids") List<Integer>ids);

    List<OutStock> findOutStockIDs(@Param("ids")List<Integer> ids);
}